package com.wqm.step.dao.impl;

import org.hibernate.Session;
import org.hibernate.SessionFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.orm.hibernate5.support.HibernateDaoSupport;
import org.springframework.stereotype.Repository;

import com.wqm.step.dao.UuidDao;
import com.wqm.step.pojo.Uuid;

@Repository
public class UuidDaoImpl extends HibernateDaoSupport implements UuidDao {

	@Autowired
	public void setSuperSessionFactory(SessionFactory factory) {
		super.setSessionFactory(factory);
	}

	/**
	 * 向数据库中保存数据
	 */
	public void saveUuid(Uuid u) {
		Session session = this.getSessionFactory().getCurrentSession();
		session.save(u);
	}

}
